package com.lfy.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface BaseEnum {
    public String getMsg();
    public Integer getCode();
    @AllArgsConstructor
    @Getter
     enum authEnum implements BaseEnum{
        LOGIN_SUCCESS("登录成功",200),
        REGISTER_SUCCESS("注册成功，请前往邮箱激活",200),
        ACTIVATION_SUCCESS("激活成功",200),

        ACTIVATION_ERROR("激活失败",601),
        LOGIN_ERROR("用户名或密码错误",602),
        REGISTER_ERROR("邮箱已注册过",603),

        NO_ACTIVATION("请前往邮箱进行激活",604),
        NO_TIME_LOGIN("请重新登录",401),
        NO_LOGIN("请先登录",403),



        ;


        final String msg;
        final Integer code;
    }
    @Getter
    @AllArgsConstructor
    enum commonEnum implements BaseEnum{
        SYSTEM_ERROR(-1, "系统出小差了，请稍后再试哦~~"),
        PARAM_VALID(-2, "参数校验失败{0}"),
        FREQUENCY_LIMIT(-3, "请求太频繁了，请稍后再试哦~~"),
        LOCK_LIMIT(-4, "请求太频繁了，请稍后再试哦~~"),
        POST_OR_GET(-5,"get和post弄混了"),
        DOUBLE_SET_UP(-6,"请勿重复操作"),
        ERROR_ADD_ME(-7,"不能自己添加自己为好友哦~"),
        ERROR_ADD_FRIEND(-8,"已经是好友了哦~"),
        ERROR_SEND_MSG(-9,"这位不是你的好友~"),
        ERROR_PARAMS(-211,"参数异常")
        ;
        private final Integer code;
        private final String msg;
    }

    @Getter
    @AllArgsConstructor
    enum regEnum implements BaseEnum{
        WAIT(0,"未激活"),
        AC(1,"已激活")
        ;
        private final Integer code;
        private final String msg;
    }
}
